package com.hk.service.sys.impl;

import org.springframework.stereotype.Service;

import com.hk.commons.LongId;
import com.hk.commons.entity.sys.SysModule;
import com.hk.dao.base.impl.BaseServiceImpl;
import com.hk.service.sys.ISysModule;

@Service
public class SysModuleImpl extends BaseServiceImpl<SysModule> implements
		ISysModule {

	@Override
	public SysModule findById(Long id) {
		return getById(id);
	}

	@Override
	public Long add(SysModule model) {
		Long id = LongId.get();
		model.setId(id);
		
		model.setCreatedts( System.currentTimeMillis());
		
		save(model);
		return id;
	}

	@Override
	public SysModule delete(Long id) {
		SysModule model = new SysModule();
		model.setId(id);
		delete(model);
		return model;
	}

}
